<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>我的小屋</title>
    <link rel="stylesheet" th:href="@{/layui-v2.6.4/layui/css/layui.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/layui-v2.6.4/layui/css/modules/code.css}" type="text/css"/>
    <script th:src="@{/js/jquery-3.5.1.min.js}"></script>
    <script charset="utf-8" th:src="@{/layui-v2.6.4/layui/layui.js}" type="text/javascript"></script>
    <script>
        layui.use('element', function () {
            var element = layui.element;
        });
    </script>
    <style>
        body {
            height: 100%;
/*            background: linear-gradient(90deg, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB, #C9CACB);*/
        }
    </style>
</head>
<body>
<!--<div class="layui-container" style="height: 500px;width: 90%">  style=" width: 100%;height: 100%;-->
    <div class="layui-row" >
        <div class="layui-col-md12" style="text-align: center; margin: auto;font-size: 20px">
<!--            <b>在线充值</b>-->
            <div style="width: 100%;height: 1px
            ;background:#E0E0E0;"></div>
        </div>
        <div class="layui-col-md10 layui-col-lg10 layui-col-sm10 layui-col-xs10 layui-row" style="height: 5px;"></div>
        <div class="layui-col-md12 layui-col-lg12 layui-col-sm12 layui-col-xs12 layui-row"style="height:1px; background:#E0E0E0;"></div>
        <br><br>
        <div class="layui-col-md9 layui-col-md-offset4">
            <form  id="form" class="layui-form"  method="get" target="_top">
                <input type="hidden" id="hidden" name="hidden" th:value="${comUser.userId}">
                <div class="layui-form-item" >
                    <label class="layui-form-label" >充值金额:</label>
                    <div class="layui-input-inline">
                        <select  lay-filter="aihao" id="sele" name="sele">
                            <option value="10">10</option>
                            <option value="20">20</option>
                            <option value="50">50</option>
                            <option value="200">200</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input class="layui-btn layui-btn-primary" type="button" onclick="resigned()" value="确认充值">
                    </div>
                </div>

            </form>
        </div>
    </div>
<!--</div>-->
<script>

    function resigned() {
        $.ajax({
            url: "/invest"
            , type: 'get'
            , async: false
            , data: {
                id: $("#hidden").val()
                , money: $("#sele").val()
            }
            , success: function (mon) {
                var mo = $(window.parent.$("#Money").html('账户资产:'+ mon));
                layer.msg('充值成功');
                setTimeout(function () {
                    location.assign("/money/"+$("#hidden").val())
                },1500);
            }
        });
    }

</script>


</body>
</html>
